/**
 * 示例如何渲染Nunjucks模板网页(HtmlResponse风格.)
 *
 * @author guojunlong@tuniu.com (Allen Guo)
 * @copyright Copyright &copy; 2006-2016 Tuniu.com
 */
'use strict';

const common = require('@tuniu/light-common');
module.exports = class {
    hello() {
        let resp = new common.HtmlResponse();
        resp.data = {
            content: '默认路由模板、有layout、有参数传递'
        };
        this.res.autoRender(resp);
    }

    anotherView() {
        let resp = new common.HtmlResponse();

        resp.data = {
            content: '非默认路由模板文件',
        };
        resp.viewPath = 'kickstart/njkClass/another';
        this.res.autoRender(resp);
    }
}